<template>
  <div class="rank">
    <div class="tab">
      <div class="tabItem on">
        <p class="icon"><i></i></p>
        <p class="text">热卖排行</p>
      </div>
      <div class="tabItem">
        <p class="icon"><i></i></p>
        <p class="text">特价排行</p>
      </div>
      <div class="tabItem">
        <p class="icon"><i></i></p>
        <p class="text">新品排行</p>
      </div>
    </div>
    <div class="content">
      <ul class="contentList">
        <li class="contentItem" v-for="(item, index) in 4" :key="index">
          <div class="tabPic">
            <a href="###">
              <img src="./images/1.jpg" alt="" />
            </a>
          </div>
          <div class="tabInfo">
            <div class="infoTitle">
              <a href="###"
                >【官网价直降1100】Apple iPhone 8 Plus 256GB 银色
                移动联通电信4G手机</a
              >
            </div>
            <div class="infoPrice">定金：¥100.00</div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: "Rank",
  data() {
    return {};
  },
};
</script>

<style scoped lang="less">
.rank {
  width: 1200px;
  margin: 0 auto;

  .tab {
    margin: 10px auto;
    width: 312px;
    display: flex;
    justify-content: space-evenly;

    .tabItem {
      i {
        width: 35px;
        height: 35px;
        display: block;
        background: url(./images/bg0.png);
        margin-left: 10px;
      }

      .text {
        line-height: 28px;
      }
    }
    .on {
      .text {
        color: #e60012;
      }

      i {
        background-position: -35px 0;
      }
    }
  }

  .content {
    width: 100%;
    .contentList {
      display: flex;
      justify-content: space-evenly;

      .contentItem {
        width: 270px;
        background: #fff;
        border-radius: 4px;

        .tabPic {
          width: 230px;
          height: 210px;
          overflow: hidden;
          text-align: center;
          margin: 5px auto 18px;

          img {
            width: 100%;
            height: 100%;
          }
        }

        .tabInfo {
          a {
            font-size: 12px;
            color: #333;
          }

          .infoPrice {
            color: #e60012;
            font-size: 20px;
            margin: 10px;
          }
        }
      }
    }
  }
}
</style>
